﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace FirstWpfApp
{
    public class Staff : INotifyPropertyChanged
    {
        private string _name;
        private int _age;
        private StaffType _staffType;


        public string Name
        {
            get { return _name; }
            set
            {
                _name = value;
                NotifyPropertyChanged("Name");
            }
        }
        public virtual int Age
        {
            get { return _age; }
            set
            {
                _age = value;
                NotifyPropertyChanged("Age");
            }
        }
        public StaffType StaffType { get { return _staffType; } }
        public string TypeName { get { return _staffType.ToString(); } }

        public Staff(string name, int age, StaffType staffType)
        {
            this._name = name;
            this._age = age;
            this._staffType = staffType;
            //string StaffName = Console.ReadLine();
            //Console.Write("Please input staff name:{0}", StaffName);
        }

        public Staff()
        {
            // TODO: Complete member initialization
        }
        //public void StaffID(_id)
        //{
        //    return 82099201;
        //}

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
    }
}
